class Solution(object):
    def judgeCircle(self, moves):
        """
        :type moves: str
        :rtype: bool
        """
        s1 = 0
        s2 = 0
        for move in moves:
            if move == 'U':
                s1 += 1
            if move == 'D':
                s1 -= 1
            if move == 'L':
                s2 += 1
            if move == 'R':
                s2 -= 1
        return not s1 and not s2
